3.1.59 \(\int x^2 (a+b \tanh ^{-1}(c x^2)) \, dx\) [59]

Optimal. Leaf size=63 \[ \frac {2 b x}{3 c}-\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \]

[Out]

2/3*b*x/c-1/3*b*arctan(x*c^(1/2))/c^(3/2)+1/3*x^3*(a+b*arctanh(c*x^2))-1/3*b*arctanh(x*c^(1/2))/c^(3/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {6037, 327, 218, 212, 209} \begin {gather*} \frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {2 b x}{3 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTanh[c*x^2]),x]

[Out]

(2*b*x)/(3*c) - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) - (b*ArcTanh[Sqrt[c]*x])/(3*c^(3/2)) + (x^3*(a + b*ArcTanh[c
*x^2]))/3

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 218

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]},
Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !Gt
Q[a/b, 0]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rubi steps

\begin {align*} \int x^2 \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {1}{3} (2 b c) \int \frac {x^4}{1-c^2 x^4} \, dx\\ &=\frac {2 b x}{3 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {(2 b) \int \frac {1}{1-c^2 x^4} \, dx}{3 c}\\ &=\frac {2 b x}{3 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \int \frac {1}{1-c x^2} \, dx}{3 c}-\frac {b \int \frac {1}{1+c x^2} \, dx}{3 c}\\ &=\frac {2 b x}{3 c}-\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 91, normalized size = 1.44 \begin {gather*} \frac {2 b x}{3 c}+\frac {a x^3}{3}-\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} b x^3 \tanh ^{-1}\left (c x^2\right )+\frac {b \log \left (1-\sqrt {c} x\right )}{6 c^{3/2}}-\frac {b \log \left (1+\sqrt {c} x\right )}{6 c^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTanh[c*x^2]),x]

[Out]

(2*b*x)/(3*c) + (a*x^3)/3 - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) + (b*x^3*ArcTanh[c*x^2])/3 + (b*Log[1 - Sqrt[c]*
x])/(6*c^(3/2)) - (b*Log[1 + Sqrt[c]*x])/(6*c^(3/2))

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 51, normalized size = 0.81

method result size
default \(\frac {x^{3} a}{3}+\frac {x^{3} b \arctanh \left (c \,x^{2}\right )}{3}+\frac {2 b x}{3 c}-\frac {b \arctanh \left (x \sqrt {c}\right )}{3 c^{\frac {3}{2}}}-\frac {b \arctan \left (x \sqrt {c}\right )}{3 c^{\frac {3}{2}}}\) \(51\)
risch \(\frac {x^{3} b \ln \left (c \,x^{2}+1\right )}{6}-\frac {b \,x^{3} \ln \left (-c \,x^{2}+1\right )}{6}+\frac {x^{3} a}{3}-\frac {b \ln \left (1+x \sqrt {c}\right )}{6 c^{\frac {3}{2}}}+\frac {b \ln \left (x \sqrt {c}-1\right )}{6 c^{\frac {3}{2}}}+\frac {2 b x}{3 c}+\frac {\sqrt {-c}\, \ln \left (1+x \sqrt {-c}\right ) b}{6 c^{2}}-\frac {\sqrt {-c}\, \ln \left (x \sqrt {-c}-1\right ) b}{6 c^{2}}\) \(114\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c*x^2)),x,method=_RETURNVERBOSE)

[Out]

1/3*x^3*a+1/3*x^3*b*arctanh(c*x^2)+2/3*b*x/c-1/3*b*arctanh(x*c^(1/2))/c^(3/2)-1/3*b*arctan(x*c^(1/2))/c^(3/2)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 66, normalized size = 1.05 \begin {gather*} \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x^{2}\right ) + c {\left (\frac {4 \, x}{c^{2}} - \frac {2 \, \arctan \left (\sqrt {c} x\right )}{c^{\frac {5}{2}}} + \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{c^{\frac {5}{2}}}\right )}\right )} b \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/6*(2*x^3*arctanh(c*x^2) + c*(4*x/c^2 - 2*arctan(sqrt(c)*x)/c^(5/2) + log((c*x - sqrt(c))/(c*x +
sqrt(c)))/c^(5/2)))*b

________________________________________________________________________________________

Fricas [A] Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (47) = 94\).
time = 0.36, size = 186, normalized size = 2.95 \begin {gather*} \left [\frac {b c^{2} x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x - 2 \, b \sqrt {c} \arctan \left (\sqrt {c} x\right ) + b \sqrt {c} \log \left (\frac {c x^{2} - 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right )}{6 \, c^{2}}, \frac {b c^{2} x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x + 2 \, b \sqrt {-c} \arctan \left (\sqrt {-c} x\right ) - b \sqrt {-c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right )}{6 \, c^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="fricas")

[Out]

[1/6*(b*c^2*x^3*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c^2*x^3 + 4*b*c*x - 2*b*sqrt(c)*arctan(sqrt(c)*x) + b*sqrt
(c)*log((c*x^2 - 2*sqrt(c)*x + 1)/(c*x^2 - 1)))/c^2, 1/6*(b*c^2*x^3*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c^2*x^
3 + 4*b*c*x + 2*b*sqrt(-c)*arctan(sqrt(-c)*x) - b*sqrt(-c)*log((c*x^2 + 2*sqrt(-c)*x - 1)/(c*x^2 + 1)))/c^2]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 670 vs. \(2 (56) = 112\).
time = 3.38, size = 670, normalized size = 10.63 \begin {gather*} \begin {cases} \frac {4 a c^{2} x^{3} \sqrt {- \frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 a c^{2} x^{3} \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c^{2} x^{3} \sqrt {- \frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c^{2} x^{3} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} - \frac {b c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {b c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {8 b c x \sqrt {- \frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {8 b c x \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} - \frac {6 b c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} - \frac {4 b \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {- \frac {1}{c}} + 12 c^{2} \sqrt {\frac {1}{c}}} & \text {for}\: c \neq 0 \\\frac {a x^{3}}{3} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c*x**2)),x)

[Out]

Piecewise((4*a*c**2*x**3*sqrt(-1/c)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) + 4*a*c**2*x**3*sqrt(1/c)/(12*c**
2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) + 4*b*c**2*x**3*sqrt(-1/c)*atanh(c*x**2)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(
1/c)) + 4*b*c**2*x**3*sqrt(1/c)*atanh(c*x**2)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) - b*c**2*(-1/c)**(3/2)*
sqrt(1/c)*log(x + sqrt(-1/c))/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) + b*c**2*sqrt(-1/c)*(1/c)**(3/2)*log(x
+ sqrt(-1/c))/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) + 8*b*c*x*sqrt(-1/c)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt
(1/c)) + 8*b*c*x*sqrt(1/c)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) - 6*b*c*sqrt(-1/c)*sqrt(1/c)*log(x + sqrt(
-1/c))/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) + 4*b*c*sqrt(-1/c)*sqrt(1/c)*log(x - sqrt(1/c))/(12*c**2*sqrt(
-1/c) + 12*c**2*sqrt(1/c)) + 4*b*c*sqrt(-1/c)*sqrt(1/c)*atanh(c*x**2)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c))
 - 4*b*log(x - sqrt(-1/c))/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)) + 4*b*log(x - sqrt(1/c))/(12*c**2*sqrt(-1/
c) + 12*c**2*sqrt(1/c)) + 4*b*atanh(c*x**2)/(12*c**2*sqrt(-1/c) + 12*c**2*sqrt(1/c)), Ne(c, 0)), (a*x**3/3, Tr
ue))

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 75, normalized size = 1.19 \begin {gather*} -\frac {1}{3} \, b c^{5} {\left (\frac {\arctan \left (\sqrt {c} x\right )}{c^{\frac {13}{2}}} - \frac {\arctan \left (\frac {c x}{\sqrt {-c}}\right )}{\sqrt {-c} c^{6}}\right )} + \frac {1}{6} \, b x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + \frac {1}{3} \, a x^{3} + \frac {2 \, b x}{3 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="giac")

[Out]

-1/3*b*c^5*(arctan(sqrt(c)*x)/c^(13/2) - arctan(c*x/sqrt(-c))/(sqrt(-c)*c^6)) + 1/6*b*x^3*log(-(c*x^2 + 1)/(c*
x^2 - 1)) + 1/3*a*x^3 + 2/3*b*x/c

________________________________________________________________________________________

Mupad [B]
time = 0.85, size = 70, normalized size = 1.11 \begin {gather*} \frac {a\,x^3}{3}-\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\right )}{3\,c^{3/2}}+\frac {2\,b\,x}{3\,c}+\frac {b\,x^3\,\ln \left (c\,x^2+1\right )}{6}-\frac {b\,x^3\,\ln \left (1-c\,x^2\right )}{6}+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3\,c^{3/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*atanh(c*x^2)),x)

[Out]

(a*x^3)/3 - (b*atan(c^(1/2)*x))/(3*c^(3/2)) + (b*atan(c^(1/2)*x*1i)*1i)/(3*c^(3/2)) + (2*b*x)/(3*c) + (b*x^3*l
og(c*x^2 + 1))/6 - (b*x^3*log(1 - c*x^2))/6

________________________________________________________________________________________